package com.study.abstractfactory.factory;

/**
 * @ClassName: FactoryProducer
 * @Description: 生产工厂
 * @Details:
 * @Author: 郑港旭
 * @Create: 2021-11-16 09:44
 **/
public class FactoryProducer {
    public static AbstractFactory getFactory(String choice){
        if (choice.equals("SHAPE")){
            return new ShapeFactory();
        } else if (choice.equals("COLOR")){
            return new ColorFactory();
        }
        return null;
    }
}
